Skip to content

Conversation

@Trim
Copy link
Member

@Trim Trim commented Feb 28, 2021

As discussed in these two suivis:

For links in news, it adds French language description before the hit counter if Language is not French.

For bookmarks, it does the same and it removes too the useless <ul> HTML tag and directly set content with the link and the French language description.

@Trim
Copy link
Member Author

Trim commented Mar 1, 2021

I've just seen there's a little thing to adjust: when we add a link in the redaction, the text "en allemand" is only shown after a page reload. That's not blocking, but I think I'll have time today to fix it.

@Trim
Copy link
Member Author

Trim commented Mar 1, 2021

I've just seen there's a little thing to adjust: when we add a link in the redaction, the text "en allemand" is only shown after a page reload. That's not blocking, but I think I'll have time today to fix it.

Ok, I've just made changes on the CoffeeScript side, it works on my development environment, but it's first time I create a new .coffee file and use sprocks.

I've tried to run rails assets:precompile to ensure the import are well ordered on my development env, but I could have missed some things else ?

Oumph and others added 4 commits March 18, 2023 21:10
- missing class to display flag on bookmarks during preview
- missing flags in some contrib CSS
- reorder langs in Redis to default to 'xx' (then 'fr', then sorted)
@Trim Trim force-pushed the link-without-flags branch from 139a102 to 2da99e6 Compare March 20, 2023 20:16
def lang_and_hit(link)
detail = "("
detail += "en #{Lang[link.lang].downcase}, " unless link.lang == 'fr'
detail += "#{pluralize link.nb_clicks, 'clic'})"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
detail += "#{pluralize link.nb_clicks, 'clic'})"
detail += pluralize link.nb_clicks, 'clic'
detail += ')'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les ' plutôt que les " c'est supposé être plus sympa pour l'interpréteur ruby, notamment côté mémoire, mais bon, ça joue ptet pas beaucoup non plus.

# encoding: UTF-8
module LinkHelper
def lang_and_hit(link)
detail = "("
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
detail = "("
detail = '('

@Trim
Copy link
Member Author

Trim commented Jan 14, 2026

Avec #383 , nous allons supprimer coffeescript, il vaudrait donc mieux attendre que l'on passe à rails8. Ensuite, je mettrais à jour le code de cette branche pour utiliser javascript.

@Trim
Copy link
Member Author

Trim commented Jan 16, 2026

Je ferme cette PR, parce qu'elle entre en conflit avec #383 qui supprime les fichiers coffeescript.

@Trim Trim closed this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants